﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SCCN.BLL;
using SCCN.Utility;

public partial class Admin_UserLogin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Session["User"] = null;
        }
    }



    protected void ibtnLogin_Click(object sender, ImageClickEventArgs e)
    {
        string userName = this.txtUserName.Text;
        string userPwd = this.txtPwd.Text;
        SysUserBLL bllSysUser = new SysUserBLL();
        SCCN.DAL.SC_SysUser obj = bllSysUser.UserLogin(userName, userPwd);
        if (obj != null)
        {
            Session["User"] = obj.UserName + "&" + obj.Id;
            Response.Redirect("index.aspx");
        }
        else
        {
            HttpHelper.Alert("密码不对！", Page);
        }
    }
}